@import 'styles/settings';
@import 'styles/typography-extends';
@import 'styles/ui.module';
@import 'styles/common-animations.module';

$card-content-max-height: 220px;

.container {
  position: fixed;
  bottom: $menuFooterHeight;
  display: flex;
  width: 100%;
  min-height: 380px;
  background-color: transparent;
  overflow: hidden;
  pointer-events: all;

  @media #{$tablet-portrait} {
    position: absolute;
    bottom: 0;
    pointer-events: none;
  }
}

.content {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  height: 400px;
  margin-top: 40px;

  @media #{$tablet-portrait} {
    height: unset;
    margin-bottom: 0;
  }
}

.cardGrid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr 1fr 170px 1fr;
  grid-template-areas:
    "breadcrumb"
    "navigation"
    "title"
    "picture"
    "text";

  background-color: $white;
  pointer-events: all;
  position: relative;
  max-width: $card-max-width;
  padding: $mobile-sidebar-side-paddings 42px 40px;
  overflow-y: scroll;
  width: 100%;

  @media #{$tablet-portrait} {
    grid-column-gap: 40px;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 190px 1fr;
    grid-template-areas:
      "breadcrumb navigation"
      "picture text"
      "exploreButton text";

    overflow-y: unset;
  }

  .breadcrumb {
    grid-area: breadcrumb;
    @extend %title;
  }

  .navigation {
    grid-area: navigation;
    justify-self: flex-end;

    .placesNavigator {
      width: 100px;
      height: 20px;
      margin-right: -10px;
      display: flex;
      justify-content: flex-end;
      align-items: center;

      .arrowWrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 40%;
        height: 100%;
        cursor: pointer;
      }

      .leftArrow {
        transform: rotate(180deg);
        fill: $dark-text;
        stroke: $dark-text;
      }

      .separator {
        height: 20px;
        width: 1px;
        background-color: $grey-text;
      }

      .rightArrow {
        fill: $dark-text;
        stroke: $dark-text;
      }
    }
  }


  .landscapeTriggerButton {
    align-self: end;
    display: flex;
    justify-self: start;
    align-items: center;
    margin-top: 20px;
    grid-area: exploreButton;
  }

  .landscapeTriggerText {
    @extend %subtitle;
    color: $dark-text;
    margin-left: 12px;
    margin-top: 4px;
  }

  .contentContainer {
    @extend %verticalScrollbar;
    grid-area: text;
    padding-bottom: 20px;
    overflow-y: unset;

    @media #{$tablet-portrait} {
      max-height: $card-content-max-height;
      overflow-y: auto;
    }
  }

  .title {
    @extend %display1;
    font-size: $font-size-xl;
    line-height: 30px;
    color: $dark-text;
    margin: 0;
    margin-bottom: 12px;
    grid-area: title;
    text-decoration: underline;
    cursor: pointer;

    @media #{$tablet-portrait} {
      margin-bottom: 0;
      font-size: $font-size-xxl;
      line-height: 50px;
    }
  }

  .text {
    @extend %bodyText;
    color: $dark-text;
    padding-bottom: 22px;

    @media #{$tablet-portrait} {
      padding-bottom: 0;
    }
  }

  .sourceText {
    @extend %bodyText;
    color: $dark-text;
    padding-bottom: 24px;
  }
}

.pictureContainer {
  background-color: $alto;
  height: 170px;
  position: relative;
  grid-area: picture;

  .picture {
    height: 100%;
    object-fit: cover;
    margin-right: 0;
    margin-bottom: 22px;
    cursor: pointer;
    width: 100%;
  }

  @media #{$tablet-portrait} {
    height: unset;

    .picture {
      margin-right: 40px;
      margin-bottom: 0;
    }
  }
}

// mobile only

.spacer {
  height: 1px;
  width: calc(100% - (2 * #{$mobile-sidebar-side-paddings}));
  background-color: $alto;
}

.spacerContainer {
  height: 3px;
  width: 100%;
  background-color: $white;
  display: flex;
  justify-content: center;
}

.exploreAreaButtonContainer {
  background-color: $white;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: {
    bottom: 12px;
    top: 12px;
  }
}

.exploreAreaButton {
  @extend %title;
  font-family: $font-family-1;
  font-size: 10px;
  width: calc(100% - (2 * #{$mobile-sidebar-side-paddings}));
  border-radius: 2px;
  padding: 10px 40px;
  color: $firefly;
  background-color: $robins-egg-blue;
}

.shareButton {
  background-color: $elephant;
  height: 32px;
  position: absolute;
  right: 0;
  top: 0;
  width: 32px;
}

.backButton {
  position: absolute;
  top: -20px;
  left: calc(50% - #{$rounded-button-size} / 2);
  box-shadow: $box-shadow-strong;
  z-index: $bring-to-front;
}